<?php
declare (strict_types = 1);

namespace app\controller;

use app\BaseController;
use app\lib\Jwt;
use think\Request;

class Token extends BaseController
{

    public function get()
    {
        $params=$this->request->param();

        $token=Jwt::encode($params['app_id'].'_'.$params['uid']);
        return $this->apiJson(0,['token'=>$token],'生成成功');
    }

}
